<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% topic = grab_attributes(pwd)['topic'] -%>
describe google_pubsub_topic(project: <%= gcp_project_id -%>, name: <%= doc_generation ? "'#{topic['name']}'" : "topic['name']" -%>) do
  it { should exist }
end

describe google_pubsub_topic(project: <%= gcp_project_id -%>, name: 'nonexistent') do
  it { should_not exist }
end